home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 231 / 231.d81 / labyrinth 101 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  107 lines

  1. 1 dq=peek(186)
  2. 2 poke55,255:poke56,55:poke650,128
  3. 5 a=a+1:ifa=1thenload"labyrinth.fnt",dq,1
  4. 7 poke53272,(peek(53272)and240)or14
  5. 10 poke53280,.:poke53281,.
  6. 20 print"[147]       [196]ispute?'s [199]azelle presents:":ch=28:nm=.:fi=1264:sb=.
  7. 25 print"[150]             [204]abyrinth 101"
  8. 26 print"            by [205]ike [205]aynard"
  9. 27 print"[153]        [211]elect difficulty level:"
  10. 30 printtab(14)"1. [154][206]ovice"
  11. 40 printtab(14)"2. [154][197]xpert"
  12. 50 printtab(14)"3. [154][209]uit":poke198,.
  13. 55 print"[153]          [208]ress selection..."
  14. 60 geta$:ifa$=""then60
  15. 70 ifa$="1"thenne$="[206]ovice":goto100
  16. 80 ifa$="2"thenne$="[197]xpert":goto100
  17. 90 ifa$="3"thengosub2140
  18. 95 goto60
  19. 100 print"[154][208]lease wait while generating maze."
  20. 101 print"[195]alculating: ":in=int(rnd(0)*100)+1000
  21. 102 fora=10334to545215stepin:print"[145][159]"tab(13)a:next:print
  22. 103 ifa$="1"thenprint"[200]mmm... [212]his one shouldn't be too hard."
  23. 104 ifa$="2"thenprint"[200]mmm... [212]his one may take you a while."
  24. 105 print"          [154][208]ress [211][208][193][195][197] [154]to start."
  25. 106 getb$:ifb$<>" "then106
  26. 108 ad=1644:mn=20:print"[147]          [154][204]abyrinth 101 [[155]"ne$"[154]]"
  27. 109 print"[154]             [208]ress [209] [154]to quit."
  28. 110 ifa$="1"thengosub1000:ad=1644:mn=20:    rem draw novice maze
  29. 120 ifa$="2"thengosub1100:ad=1644:mn=0:    rem draw expert maze
  30. 130 print"[129][213]se [158][211][200][201][198][212] [210][197][212][213][210][206][129], [158][198]6[129], [158][195][207][205][205][207][196][207][210][197] [197][129],"
  31. 135 print"and [158][195][212][210][204] [201] [129]to move up, right, down,"
  32. 140 print"and left, respectfully."
  33. 145 print"([193] joystick in port [150]2 will work also.)"
  34. 150 pokead,ch:poke54272+ad,1:ifad<fithen800
  35. 151 j2=(peek(56320)and15):geta$
  36. 152 if(07eorj2)<>15thena$=chr$(141)
  37. 153 if(13eorj2)<>15thena$=""
  38. 154 if(11eorj2)<>15thena$="[139]"
  39. 155 if(14eorj2)<>15thena$="[177]"
  40. 160 ifa$<>chr$(141)anda$<>""anda$<>"[139]"anda$<>"[177]"anda$<>"q"then151
  41. 170 ifa$=chr$(141)thena=-40
  42. 175 ifa$=""thena=-1
  43. 180 ifa$="[139]"thena=1
  44. 185 ifa$="[177]"thena=40
  45. 190 ifa$="q"andnm<mnthengosub2100:goto151
  46. 195 ifa$="q"andnm>=mnthen900
  47. 200 ifpeek(ad+a)=32thenpokead,32:ad=ad+a:a=.:hi=1:gosub2000:nm=nm+1
  48. 205 ifpeek(ad+a)=32thengosub300:goto150
  49. 210 hi=95:gosub2000:goto151
  50. 300 if(ad<>1414)or(sb)thenreturn
  51. 310 sb=1
  52. 320 print"[189]     [173]"
  53. 330 print"[178][157][221][157][189]";:return
  54. 800 print"";
  55. 802 fora=1to4:print"                                       ":next:print"[145][145][145][145]";
  56. 805 print"[158][193]-mazing!! [217]ou made it out of the maze!"
  57. 810 print"[154]        [208]ress [211][208][193][195][197][154] to continue.       ":poke198,.
  58. 820 geta$:ifa$<>" "then820
  59. 830 goto10
  60. 900 print"         [211]o close, yet so far ...  "
  61. 910 fora=1to3000:next:goto10
  62. 999 end
  63. 1000 print"                 [221][158][197][216][201][212]![221]"
  64. 1005 print"                 [221]     [221]"
  65. 1008 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  66. 1010 print"[221]                                      [221]";
  67. 1020 print"[221]   [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]   [221]";
  68. 1030 print"[221]   [221]                              [221]   [221]";
  69. 1040 print"[221]   [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]   [221]   [221]";
  70. 1050 print"[221]                                  [221]   [221]";
  71. 1060 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]   [221]";
  72. 1070 print"                 [221]                     [221]";
  73. 1080 print"                 [221]     [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  74. 1090 print"                 [221]     [221]"
  75. 1095 print"                 [221][158][197][206][212][197][210][221]"
  76. 1099 return
  77. 1100 print"                 [221][158][197][216][201][212]![221]"
  78. 1105 print"                 [221]     [221]"
  79. 1108 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  80. 1110 print"[221]                [221]     [221]               [221]";
  81. 1120 print"[221]   [176][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192][192][192][192][174]   [221]";
  82. 1130 print"[221]   [221]            [221]     [221]           [221]   [221]";
  83. 1140 print"[221]   [173][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192]   [221]   [221]";
  84. 1150 print"[221]                [221]     [221]           [221]   [221]";
  85. 1160 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192][192][192][192][189]   [221]";
  86. 1170 print"                 [221]     [221]               [221]";
  87. 1180 print"                 [221]     [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  88. 1190 print"                 [221]     [221]"
  89. 1195 print"                 [221][158][197][206][212][197][210][221]"
  90. 1199 return
  91. 2000 poke54296,15:poke54276,.:poke54273,hi:poke54272,100
  92. 2010 poke54277,5:poke54278,5:poke54276,33:return
  93. 2100 ifnm<20then2200
  94. 2110 print"[154][145]  [193]re you sure you want to quit? ([217][154]/[206][154])":poke198,.
  95. 2120 geta$:ifa$<>"y"anda$<>"n"then2120
  96. 2130 ifa$="n"then2220
  97. 2140 open15,dq,15,"r0:connect=connect":input#15,er:close15:ifer<>63thenend
  98. 2145 poke53272,23:poke55,.:poke56,160
  99. 2150 load "connect",dq
  100. 2200 print"[150]          [217]ou give up too easy."
  101. 2210 fora=1to2000:next
  102. 2220 print"[145]             [154][208]ress [209] [154]to quit.         "
  103. 2230 poke198,.:return
  104. 59999 end
  105. 60000 d=peek(186):open1,d,15,"i0":n$="labyrinth 101"
  106. 60001 print#1,"s0:"+n$:close1:saven$,d:end
  107.